package com.carkeeper.pojo;

import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import javax.persistence.Id;
import java.io.Serializable;

/**
 * @author pengjinxiong
 * @version 1.0
 * @date 2020/11/24 10:45
 */
//服务目录索引
@Document(indexName = "serviceinfo", type = "docs")
public class ServiceInfo implements Serializable {
    @Id
    @Field(index = true, store = true, type = FieldType.Keyword)
    private Long id;
    //服务商名称
    @Field(index = true, store = true, type = FieldType.Text, analyzer = "ik_smart")
    private String storeName;
    //服务编码
    @Field(index = true, store = true, type = FieldType.Keyword)
    private String code;
    //服务项目名称
    @Field(index = true, store = true, type = FieldType.Text, analyzer = "ik_smart")
    private String serviceName;
    //服务分类
    @Field(index = true, store = true, type = FieldType.Keyword)
    private String serviceType;
    //价格，单位为：元
    @Field(index = true, store = true, type = FieldType.Integer)
    private Integer price;
    //状态
    @Field(index = true, store = true, type = FieldType.Keyword)
    private String status;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getStoreName() {
        return storeName;
    }

    public void setStoreName(String storeName) {
        this.storeName = storeName;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getServiceName() {
        return serviceName;
    }

    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }

    public String getServiceType() {
        return serviceType;
    }

    public void setServiceType(String serviceType) {
        this.serviceType = serviceType;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public ServiceInfo(Long id, String storeName, String code, String serviceName, String serviceType, Integer price, String status) {
        this.id = id;
        this.storeName = storeName;
        this.code = code;
        this.serviceName = serviceName;
        this.serviceType = serviceType;
        this.price = price;
        this.status = status;
    }

    public ServiceInfo() {
    }
}
